<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div class="col-mb-12 col-offset-1 col-3 kit-hidden-tb" id="secondary"
	role="complementary">

	<c:if test="${!empty  recentPosts}">
		<section class="widget">
			<h3 class="widget-title">最新文章</h3>
			<ul class="widget-list">
				<c:forEach var="post" items="${recentPosts}">
					<li><a itemtype="url"
						href="${options.siteUrl}/post/${post['cid']}">${post['title']}</a></li>
				</c:forEach>
			</ul>
		</section>
	</c:if>

	<c:if test="${!empty  recentComments}">
		<section class="widget">
			<h3 class="widget-title">最近回复</h3>
			<ul class="widget-list">
				<c:forEach var="comment" items="${recentComments}">
					<li><span><a itemtype="url"
							href="${options.siteUrl}/post/${comment['cid']}#comments-${comment['coid']}">${comment['author']}
								: </a></span> ${comment['text']}</li>
				</c:forEach>
			</ul>
		</section>
	</c:if>

	<c:if test="${!empty  categories}">
		<section class="widget">
			<h3 class="widget-title">分类</h3>
			<ul class="widget-list">
				<c:forEach var="category" items="${categories}">
					<li class="category-level-0 category-parent"><a
						href="${options.siteUrl}/category/${category['slug']}">${category['name']}</a>
					</li>
				</c:forEach>

			</ul>
		</section>
	</c:if>

	<c:if test="${!empty  archives}">
		<section class="widget">
			<h3 class="widget-title">归档</h3>
			<ul class="widget-list">
				<c:forEach var="archive" items="${archives}">
					<li><a href="${options['siteUrl']}/archive/${archive['url']}">${archive['text']}</a></li>
				</c:forEach>
			</ul>
		</section>
	</c:if>

	<c:if test="${!empty  friendLinks}">
		<section class="widget">
			<h3 class="widget-title">友情链接</h3>
			<ul class="widget-list">
				<c:forEach var="link" items="${friendLinks}">
					<li><a href="${link['text']}" target="_blank">${link['title']}</a></li>
				</c:forEach>
			</ul>
		</section>
	</c:if>

	<section class="widget">
		<h3 class="widget-title">快捷入口</h3>
		<ul class="widget-list">
			<c:if test="${user!=null&&user['group']=='administrator'}">
				<li class="last"><a href="${options.siteUrl}/admin/">进入后台
						(${user['screenName']})</a></li>
				<li><a href="${options.siteUrl}/action?do=logout">退出</a></li>
			</c:if>
			<c:if test="${user==null}">
				<li><a href="${options.siteUrl}/user">登录</a></li>
			</c:if>
		</ul>
	</section>